#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<stdio.h>
#include<string.h>
int main()
{
	int n = 0;
	scanf("%d", &n);
	char arr1[80] = { 0 };
	char arr2[80] = { 0 };
	int i = 0;
	for (i = 0; i < n; i++)
	{
		scanf("%s", arr1);
		if (strlen(arr1) > strlen (arr2))
		{
			for (int j = 0; j < (strlen(arr1)); j++)
			{
				arr2[j] = arr1[j];
			}
		}
	}
	printf("%s",arr2);
}